﻿using System;
using System.Collections.Generic;

namespace AppMain
{
    public class TMLieDownProcesser : BaseMoveProcesser
    {
        float lieTime = 0.3f;
        float add = 0;
        protected override void onEnter(RoleMove_Status fromStatus)
        {
            this.agent.Lock((int)Lock_Status.MoveLock);
            add = 0;
        }

        protected override void onUpdate()
        {
            add = 0;
        }

        protected override void onExit(RoleMove_Status toStatus)
        {

        }

        protected override void onTick(float frameTime)
        {
            add += frameTime;
            if (add >= lieTime)
            {
                this.agent.moveWidget.forceTo(RoleMove_Status.LieUp);
            }
        }

        protected override void onDispose()
        {

        }
    }
}
